<?php

/*
Admin Skins (admin_skins.php)
*/

$page_title = "Set your Skin";
$rank_check = 7;
include "../header.inc.php";

if ($skin_type == "install")
{
	if (
	($skin_name != "simply_blue") AND 
	($skin_name != "orange") AND 
	($skin_name != "orange2") AND 
	($skin_name != "fire") AND 
	($skin_name != "princess") AND 
	($skin_name != "screws") AND 
	($skin_name != "omegapets") AND 
	($skin_name != "halloween") AND 
	($skin_name != "dark")
	)
	{
		die("$openHTML<p>Choose a valid skin.</p>$closeHTML");
	}
	
	mysql_query("UPDATE game_tables SET design = '$skin_name' WHERE id = '$game'");
	
	header("Location: admin_skins.php?game=$game");
}

print "$openHTML";

if (!$skin_type)
{
	print "<p align=center>Choose the skin type you want:</p>";
	
	print "<p align=center>
	<a href=admin_skins.php?game=$game&skin_type=simple>Fast Loads Text Template</a><Br>
	</p>";	
}

if ($skin_type == "simple")
{
ECHO <<<END

<p align=center>Click on your desired skin to change the outlook</p>

<table width=80% border=0 cellspacing=5 cellpadding=0 align=center>
  <tr align=left valign=top> 
    <td width=33%><a href=admin_skins.php?game=$game&skin_type=install&skin_name=simply_blue><img src=/admin/images/blue.jpg width=205 height=154 border=0></a></td>
    <td width=23%><a href=admin_skins.php?game=$game&skin_type=install&skin_name=dark><img src=/admin/images/dark.jpg width=205 height=154 border=0></a></td>
    <td width=44%><a href=admin_skins.php?game=$game&skin_type=install&skin_name=orange><img src=/admin/images/orange.jpg width=205 height=154 border=0></a></td>
  </tr>
  <tr align=left valign=top> 
    <td width=33%><a href=admin_skins.php?game=$game&skin_type=install&skin_name=fire><img src=/admin/images/fire.jpg width=205 height=154 border=0></a></td>
    <td width=23%><a href=admin_skins.php?game=$game&skin_type=install&skin_name=princess><img src=/admin/images/princess.jpg width=205 height=154 border=0></a></td>
    <td width=44%>&nbsp;</td>
  </tr>
</table>

END;
}

print "$closeHTML";
?>
